Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in LastOrDefault for extrema sequence #761

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

atifaziz
Copy link
Member

This PR fixes the bug reported in #760.

Note that the tests added in 86f6f58 were testing First, FirstOrDefault, Last and LastOrDefault members of System.Linq.Enumerable rather than those from MoreLINQ that extend IExtremaEnumerable<>. This PR fixes that too. In fact, the bug only surfaced after realising that 86f6f58 wasn't testing the right implementation.

@atifaziz atifaziz linked an issue Aug 14, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 14, 2020

Codecov Report

Merging #761 into master will increase coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #761      +/-   ##
==========================================
+ Coverage   88.55%   88.90%   +0.34%     
==========================================
  Files         106      106              
  Lines        3487     3487              
  Branches      978      978              
==========================================
+ Hits         3088     3100      +12     
+ Misses        258      250       -8     
+ Partials      141      137       -4     
Impacted Files Coverage Δ
MoreLinq/MaxBy.cs 93.80% <100.00%> (+10.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dae766c...4674730. Read the comment docs.

@atifaziz atifaziz merged commit 4674730 into morelinq:master Aug 14, 2020
@atifaziz atifaziz deleted the fix/760 branch August 14, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LastOrDefault on Min/MaxBy returns first
1 participant